import { DeviceStatus } from '../../constants/device';

export function getDeviceStatusDisplay(status) {
  switch (status) {
    case DeviceStatus.Unknown:
      return '未知';
    case DeviceStatus.Normal:
      return '正常';
    case DeviceStatus.Abnormal:
      return '告警';
    case DeviceStatus.OnCheck:
      return '临检';
    case DeviceStatus.Offline:
      return '离线';
  }
}

export function getDeviceStatusColor(status) {
  switch (status) {
    case DeviceStatus.Unknown:
      return '#10aeff';
    case DeviceStatus.Normal:
      return '#07c160';
    case DeviceStatus.Abnormal:
      return '#fa5151';
    case DeviceStatus.OnCheck:
      return '#ffc300';
    case DeviceStatus.Offline:
      return '#aaa';
  }
}
